<template>
  <div class="detail-page">
    <el-page-header  @back="$router.back()" />
    <el-card v-if="detail" class="mt-4">
      
      <template #header></template>

<!-- {{ detail.orderComment.orderNo }} -->


    </el-card>
    <el-empty v-else description="加载中…" />
  </div>
</template>







<script setup>
import { useRoute } from 'vue-router'
import { onMounted, ref } from 'vue'
import { getReviewDetail } from '@/api/order'
import { ElMessage } from 'element-plus'
const route = useRoute()    
const id = ref(route.params.id) 
const detail   = ref(null)
const loading   = ref(false)
const errorMsg  = ref('')
// async function fetchDetail (orderId) {
//   loading.value  = true
//   detail.value   = null
//   errorMsg.value = ''
//   console.log(id.value)
//   try {
//     const resp = await getReviewDetail(orderId)
//     detail.value = resp.data          // 后端 AjaxResult.success(data)
//   } catch (err) {
//     errorMsg.value = err?.msg || '加载失败'
//     ElMessage.error(errorMsg.value)
//   } finally {
//     loading.value = false
//   }
// }



// onMounted(() => fetchDetail(id.value))
</script>
